<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->resource('user', 'UserController'); //用户管理
    $router->resource('staff', 'StaffController'); //员工管理
    $router->resource('brand', 'BrandController'); //品牌管理
    $router->resource('store', 'StoreController'); //门店管理
    $router->resource('department', 'DepartmentController'); //部门管理
    $router->resource('car', 'CarController'); //汽车管理
    $router->resource('car-package-category', 'CarPackageCategoryController'); //汽车套餐分类管理
    $router->resource('car-package-type', 'CarPackageTypeController'); //汽车套餐类型管理
    $router->resource('car-package', 'CarPackageController'); //汽车套餐管理
    $router->resource('car-package-order', 'CarPackageOrderController'); //汽车套餐订单管理
    $router->resource('car-package-order-attr', 'CarPackageOrderAttrController'); //汽车套餐订单属性管理
    $router->resource('car-package-used-log', 'CarPackageUsedLogController'); //汽车套餐使用记录管理
    $router->resource('car-package-operator-log', 'CarPackageOperatorLogController'); //汽车套餐操作记录管理
    $router->resource('user-car', 'UserCarController'); //用户汽车管理
    $router->resource('car-package-order-examine', 'CarPackageOrderExamineController'); //用户套餐订单核销管理
    $router->resource('car-package-used-log', 'CarPackageUsedLogController'); //汽车套餐使用记录管理
    $router->resource('answer-survey', 'AnswerSurveyController'); //答题管理
    $router->resource('answer-survey-subject', 'AnswerSurveySubjectController'); //答题题目管理
    $router->resource('answer-survey-option', 'AnswerSurveyOptionController'); //答题选项管理
    $router->resource('answer-survey-log', 'AnswerSurveyLogController'); //答题记录管理

    $router->get('package-category-has-car', 'CarPackageCategoryController@categoryHasCar');
    $router->get('package-has-category', 'CarPackageController@hasCategory');
    $router->get('package-merge', 'CarPackageController@mergePackage');
    $router->get('staff-department', 'StaffController@staffDepartment');
    $router->get('answer-has-subject', 'AnswerSurveyOptionController@hasSubject');
    $router->get('export', 'AnswerSurveyLogController@export');
    $router->get('package-car', 'CarPackageOrderController@packageCar');
    $router->get('category-package', 'CarPackageOrderController@categoryPackage');
});
